import React from 'react';
import { Form, Input } from 'antd';
import RegionSelect from '@/components/RegionSelect';
import OrganizationTypeSelect from '@/components/OrganizationTypeSelect'
import OrganizationSelect from '@/components/OrganizationSelect'
import SchoolTypeSelect from '@/components/SchoolTypeSelect'

const Content = React.forwardRef((props, ref) => (
  <Form
    ref={ref}
    labelCol={{ span: 6 }}
    wrapperCol={{ span: 16 }}
    layout="horizontal">
    <Form.Item
      name='name'
      label='机构名称：'
      rules={[{ required: true, message: '机构名称不能为空' }]}>
      <Input placeholder='请输入机构名称' />
    </Form.Item>
    <Form.Item
      name='parentId'
      rules={[{ required: true, message: '所属机构不能为空！' }]}
      label='所属机构：'>
      <OrganizationSelect />
    </Form.Item>
    <Form.Item
      name='region'
      label='城市/区域：'
      rules={[{ required: true, message: '城市/区域不能为空' }]}>
      <RegionSelect changeOnSelect={false} />
    </Form.Item>
    <Form.Item
      name="address"
      label="详细地址">
      <Input placeholder="请输入详细地址" />
    </Form.Item>
    <Form.Item
      name="type"
      label="机构类型"
      rules={[{ required: true, message: '请选择机构类型' }]}>
      <OrganizationTypeSelect />
    </Form.Item>
    <Form.Item
      name="subType"
      label="学校类型"
      rules={[{ required: true, message: '请选择学校类型' }]}>
      <SchoolTypeSelect />
    </Form.Item>
    <Form.Item
      name="contactPerson"
      label="联系人">
      <Input placeholder="请输入联系人" />
    </Form.Item>
    <Form.Item
      name="contactPhone"
      label="联系电话">
      <Input placeholder="请输入联系电话" />
    </Form.Item>
  </Form>

))

export default Content